
# Desc: Device definitions for UDM's Cerberus
# Author: Kevin Barry
# Date: 29 Apr 2007
# Updated: 23 April 2010 by Alex Szmatula

# cerberus uses the 270 ladar
#include "sick.inc"
#include "igvc.inc"

define wheel model
(
size [ .41 .07 .41] 
color "black"
)

# a cerberus
define cerberus position
(
  # watchdog_timeout .3 # 300ms watchdog
  # actual size in meters
  size [ .96 .62 .46]

  # the center of rotation is offset from its center of area
  # Center of Area = (0.2584 , 0.000)
  origin [ 0.2584 0.0 0 0]

  gui_nose 0 # don't need it since we have the SICK on the front
  gui_outline 1
  # estimated mass in KG
  mass 114.0

  block(	
  # this polygon approximates the shape of a cerberus
  points 6
  #     ___.
  #    /   |
  #   |    |
  #    \___|

  # Coordinates start at bottom left and move ccw
  point[0] [  -0.1524 -0.310  ]  # South east point
  point[1] [   0.1524 -0.310  ]  # Southern Point
  point[2] [   0.8076 -0.120  ]  # South of west point
  point[3] [   0.8076  0.120  ]  # North of west point
  point[4] [   0.1524  0.310  ]  # Northern point
  point[5] [  -0.1524  0.310  ]  # East bar by wheel
  z [0.12 0.46]
  )

  # Draw wheels - wheel sizes listed were taken from captop
#  rectangle ( size [ .41 .07 .41] pose [ .0 -.365 -1 0] color "black" )
#  rectangle ( size [ .41 .07 .41] pose [ .0 +.365 -1 0] color "black" )
  wheel ( pose [ .0 -.365 -0.46 0] )
  wheel ( pose [ .0  .365 -0.46 0] )

  # Draw GPS (Center of rotation)
  circle ( pose [0 0 0 0] size [ .12 .12 .12] color "white" gui_outline 0)


  # Camera/blobfinder
#  ptz ( pose [+.22 0 0] 
#     	fov 180
#        blobfinder(obstacle_return 0)
#        obstacle_return 0
#	)
#
  # Draw LADAR
  sicklaser270 ( pose [ 0.80 0 -0.05 0] )

  # differential steering model
  drive "diff"

  localization "gps"
  localization_origin [ 0 0 0 ]
)

 
